import request from '@/utils/request'

// 查询交车单模板列表
export function contractTemplateList(query) {
  return request({
    url: '/contractTemplate/contractTemplateDelivery/list',
    method: 'get',
    params: query
  })
}

// 获取其他合同模板详细信息
export function contractTemplateDetails(id) {
    return request({
        url: `/contractTemplate/contractTemplateDelivery/${id}`,
        method: 'get'
    })
}


// 保存
export function contractTemplateAdd(data) {
  return request({
    url: '/contractTemplate/contractTemplateDelivery',
    method: 'post',
    data:data
  })
}

// 编辑
export function contractTemplateUpdate(data) {
  return request({
    url: '/contractTemplate/contractTemplateDelivery',
    method: 'put',
    data:data
  })
}


//启用前校验
export function enableVerify(id) {
    return request({
        url: `/contractTemplate/contractTemplateDelivery/enableVerify/${id}`,
        method: 'put'
    })
}


//启用
export function contractTemplateEnable(id) {
    return request({
        url: `/contractTemplate/contractTemplateDelivery/confirmEnable/${id}`,
        method: 'put'
    })
}

//禁用
export function contractTemplateDisable(id) {
    return request({
        url: `/contractTemplate/contractTemplateDelivery/disable/${id}`,
        method: 'put'
    })
}


// 作废
export function contractTemplateDelete(ids) {
  return request({
    url: `/contractTemplate/contractTemplateDelivery/${ids}`,
    method: 'delete'
  })
}


// 操作记录
export function contractTemplateLog(id) {
    return request({
        url: `/contractTemplate/contractTemplateDelivery/log/${id}`,
        method: 'get'
    })
}


